<template>
	<view>
		<view class="fui-navbar">
			
		    <navigator  v-for="(key, index) in nav" :key="index" :url="nav[index].url" :class="'external nav-item '+ (lost==nav[index].url?'factive':'')" >
		        <span :class="'iconfont '+nav[index].icon"></span>
		        <span class="label">{{nav[index].name}}</span>
		    </navigator>
		
		    
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				lost:'',
				nav:[
					{
						'name':'工作台',
						'url':'../merchmanage/merchmanage',
						'icon':'icon-shouye'
						
					},
					{
						'name':'发现',
						'url':'../find/find',
						'icon':'icon-faxian'
						
					},
					{
						'name':'商品',
						'url':'../goods/goods',
						'icon':'icon-shangpinguanli'
						
					},
					{
						'name':'推广',
						'url':'../popularize/popularize',
						'icon':'icon-shangpinguanli'
						
					},
					{
						'name':'订单',
						'url':'../order/order',
						'icon':'icon-wqdd'
					
					},
					{
						'name':'结算',
						'url':'../apply/apply',
						'icon':'icon-daifukuan'
						
					},
					{
						'name':'设置',
						'url':'../set/set',
						'icon':'icon-shezhi1'
						
					}
				]

			};
		},
		created(){
			let lost=this.$route.path
			lost=lost.replace("/pages/","../")　
			if(lost=='/')
				lost='../merchmanage/merchmanage'
			this.lost=lost
			
			
		}
	}
</script>

<style>
.factive{
	color:#5cb85c;
}
</style>
